From: Florian Müllner Date: Fri, 24 Oct 2025 11:39:03 +0000 (+0200) Subject: lint: Enable 'prefer-const' rule X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~44^2~163 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=906d187f0fbbebc11638ca0209ad247efc2ef399;p=gnome-shell.git lint: Enable 'prefer-const' rule Now that all code conforms with the rule, we can enforce it to make sure we stick to it with new code. Relax the rule for destructuring, so we don't have to jump through hoops to avoid "mixed" assignments. Part-of: --- diff --git a/tools/eslint.config.js b/tools/eslint.config.js index 6c7c37742..8c59c581e 100644 --- a/tools/eslint.config.js +++ b/tools/eslint.config.js @@ -32,6 +32,9 @@ export default defineConfig([ afterColon: true, }], 'prefer-arrow-callback': 'error', + 'prefer-const': ['error', { + destructuring: 'all', + }], 'jsdoc/require-param-description': 'off', 'jsdoc/require-jsdoc': ['error', { exemptEmptyFunctions: true,